﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace UniRlv.Server.ILayer
{
    public interface IServerOpr
    {
        bool TestConnect(ref string errDesc);
        object GetScalar(string sql, int key, ref string errDesc);
        bool ExecuteNonQuery(string sql, int key, ref string errDesc);
        bool ExecuteNonQueryTran(string sql, int key, ref string errDesc);
        string Query(string sql, int key);
        string QuerySingle(string sql, int key);
        Dictionary<string, string> IfNeedUpdate(Dictionary<string, string> files, ref string errDesc);
        byte[] DownloadFile(string fileName, ref string errDesc);

        bool IfTableExist(string tbName);
        bool IfColumnExist(string tbName, string col);
        bool AddColumn(string tbName, string col, int key, string desc, ref string errDesc);

        bool ExcuteBulkCopy(string tbDest, DataTable dtSrc, ref string errDesc);

        bool BackupTask(List<string> ids, ref string errDesc);
    }
}
